// 配置
let envir = 'hbydy'
// let envir = 'fhqq'
let ENVIRONMENT_CONFIG = {}
const accountInfo = wx.getAccountInfoSync()
const env = accountInfo.miniProgram.envVersion
// const env =  'release'
import MENUS from './menus.js'

console.warn('|||||||||||||||||||||||||||||||||||||')
console.warn('若修改appkey为自己的appkey后，且自己的appey暂未开通订阅权限，需要注释掉im.js文件中”onpushevents: this.onPushEvents“这一行以及onFriends回调中subscribeEvent方法。或者。。。')
// 或者可以修改代码 ENVIRONMENT_CONFIG.openSubscription = false
console.warn('|||||||||||||||||||||||||||||||||||||')
// 若修改appkey为自己的appkey后，且自己的appey暂未开通订阅权限，
// 需要注释掉im.js文件中”onpushevents: this.onPushEvents“这一行以及onFriends回调中subscribeEvent方法。
let configMap = {
    yjs: {
      appkey: 'b0d8754e06bc139fd6e24572f5f302db',
      url: 'https://api.netease.im',
      systemBaseUrl: 'https://online.yjsyy.com',
      imgBaseUrl: 'http://hlwyy.ruthenglish.cn:29529/static/photo/yjs',
      IMPrefix: 'yjs_',
      homeHosTitle: '弋矶山医院',
      hosName: '皖南医学院附属弋矶山医院',
      hosAddress: '安徽省芜湖市镜湖区赭山西路2号-1号门诊楼1楼',
      sourceFullDate: 1,
      needPay: true,
      hasChat: true,
      hasExpress: true,
      mainMenus: MENUS.mainMenus.hbydy,
      subMenus: MENUS.subMenus.hbydy
    },
    cn: {
      appkey: 'b0d8754e06bc139fd6e24572f5f302db',
      url: 'https://api.netease.im',  //https://app.netease.im
      systemBaseUrl: 'https://wx.anxhit.com:1443',//系统的url
      imgBaseUrl: 'http://wx.anxhit.com:29529/static/photo/cn',
      IMPrefix: 'cn_',
      homeHosTitle: '龙港市人民医院',
      hosName: '龙港市人民医院',
      hosAddress: '温州市龙港市龙翔路238号',
      sourceFullDate: 0,
      needPay: true,
      hasChat: true,
      hasExpress: true,
      mainMenus: MENUS.mainMenus.hbydy,
      subMenus: MENUS.subMenus.hbydy
    },
    hbydy: {
      appkey: 'b0d8754e06bc139fd6e24572f5f302db',
      url: 'https://api.netease.im',
      systemBaseUrl: env === 'develop' ? 'https://wx.jyyy.com.cn:8095' : (env === 'trial' ? 'https://wx.jyyy.com.cn:9899' : 'https://wx.jyyy.com.cn:8092'),
      // systemBaseUrl: env === 'develop' ? 'http://localhost:9899' : (env === 'release' ? 'https://anxhit.ruthenglish.cn:29529/' : 'https://anxhit.ruthenglish.cn/server/'),
      //   systemBaseUrl:'https://anxhit.ruthenglish.cn/server/',
      // imgBaseUrl: 'https://anxhit.ruthenglish.cn:29529/static/photo/sjz',
      imgBaseUrl: 'https://wx.jyyy.com.cn:8092/static/photo/sjz',
      IMPrefix: 'hbydy_',
      homeHosTitle: 'MOTIF飞盘俱乐部',
      hosName: 'MOTIF飞盘俱乐部',
      hosAddress: ' ',
      hosLocations: [
        {
          lat: 38.01612,
          lon: 114.55286,
        },
        {
          lat: 39.157896,
          lon: 117.382058
        },
        {
          lat: 40.050645,
          lon: 116.283448
        }
      ],
      sourceFullDate: 1,
      needPay: false,
      hasChat: false,
      hasExpress: false,
      mainMenus: MENUS.mainMenus.hbydy,
      subMenus: MENUS.subMenus.hbydy
    },
    fhqq: {
      appkey: 'b0d8754e06bc139fd6e24572f5f302db',
      url: 'https://api.netease.im',
        // systemBaseUrl: env === 'develop' ? 'http://localhost:9529' : (env === 'release' ? 'https://www.stephen-curry.online:9528' : 'https://www.stephen-curry.online:8172'),
      systemBaseUrl: env === 'develop' ? 'http://localhost:9529' : 'https://www.stephen-curry.online:9528',
      // systemBaseUrl: 'https://www.stephen-curry.online:9528', //8172
      // systemBaseUrl: 'http://localhost:9529/',
      imgBaseUrl: 'https://www.stephen-curry.online:9528/static/photo/qqhe',
      IMPrefix: 'fhqq_',
      homeHosTitle: '齐齐哈尔市第一医院',
      hosName: '齐齐哈尔市第一医院',
      hosAddress: '黑龙江省齐齐哈尔市龙沙区卜奎南大街700号(南院)',
      qqhe: true,
      hosLocations: [
        {
          lat: 47.353225,
          lon: 123.956724,
        },
        {
          lat: 39.157896,
          lon: 117.382058
        },
        {
          lat: 40.050645,
          lon: 116.283448
        }
      ],
      sourceFullDate: 1,
      needPay: false,
      hasChat: false,
      hasExpress: false,
      mainMenus: MENUS.mainMenus.fhqq,
      subMenus: MENUS.subMenus.fhqq
    },
};
ENVIRONMENT_CONFIG = configMap[envir];
// 是否开启订阅服务
ENVIRONMENT_CONFIG.openSubscription = true
ENVIRONMENT_CONFIG.privateConf = {
  "lbs_web": "http://59.111.108.145:8281/lbs/webconf.jsp",
  "link_ssl_web": false,
  "nos_uploader_web": "http://59.111.108.145:10080",
  "https_enabled": false,
  "nos_downloader": "59.111.108.145:10080/{bucket}/{object}",
  "nos_accelerate": "",
  "nos_accelerate_host": "",
  "nt_server": ""
}
// 是否开启私有化部署
ENVIRONMENT_CONFIG.openPrivateConf = false

module.exports = ENVIRONMENT_CONFIG
